Skip to content

feat: support fullUrl in EndpointConfiguration to bypass default signal path appending#1723

Merged
breedx-splk merged 1 commit into
open-telemetry:mainfrom
Cloud-Architect-Emma:fix-custom-signal-url-v2
May 18, 2026
Merged

feat: support fullUrl in EndpointConfiguration to bypass default signal path appending#1723
breedx-splk merged 1 commit into
open-telemetry:mainfrom
Cloud-Architect-Emma:fix-custom-signal-url-v2

Conversation

@Cloud-Architect-Emma

Copy link
Copy Markdown
Contributor

Fixes #1712

Summary

When using HttpExportConfiguration, the signal-specific paths (/v1/logs,
/v1/traces, /v1/metrics) are always appended to the base URL. This makes
it impossible to use a custom endpoint path like /v2/logs.

This PR adds a fullUrl property to EndpointConfiguration that, when set,
bypasses the automatic path appending and uses the provided URL as-is.

Usage

httpExport {
    baseUrl = "https://example.com"
    logs {
        fullUrl = "https://example.com/v2/logs"  // used as-is, no path appended
    }
    // traces still uses: https://example.com/v1/traces
    // metrics still uses: https://example.com/v1/metrics
}

Changes

  • Added fullUrl: String? property to EndpointConfiguration
  • Updated HttpExportConfiguration to use fullUrl when set, falling back
    to existing url + path behaviour
  • Updated HttpEndpointConnectivity.forTraces/forLogs/forMetrics to accept
    a fullUrl flag
  • Fixed detekt violations (trailing commas, line length)
  • Added tests covering the new behaviour

Notes

This supersedes PR #1715 which had CLA identity issues.

@Cloud-Architect-Emma Cloud-Architect-Emma requested a review from a team as a code owner May 5, 2026 21:00
@linux-foundation-easycla

linux-foundation-easycla Bot commented May 5, 2026

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Cloud-Architect-Emma / name: Emmanuela Opurum (b930b22)

@Cloud-Architect-Emma

Copy link
Copy Markdown
Contributor Author

/easycla

@Cloud-Architect-Emma Cloud-Architect-Emma force-pushed the fix-custom-signal-url-v2 branch 7 times, most recently from 08e18f9 to 3f88171 Compare May 6, 2026 02:26
@Cloud-Architect-Emma

Cloud-Architect-Emma commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

Hi @breedx-splk, quick update, the line endings and detekt issues are
now fixed! EasyCLA is passing.

The only remaining blocker is a conflict in android-agent/api/android-agent.api.
This file is auto-generated by Gradle and I'm unable to run it locally
without the Android SDK set up.

Could you resolve it by running:

./gradlew :android-agent:apiDump

and pushing to my branch? That should be the very last thing needed
before this PR is ready for review.

I'm really sorry for all the trouble and deeply appreciate your patience.
Thank you so much!

@Cloud-Architect-Emma Cloud-Architect-Emma force-pushed the fix-custom-signal-url-v2 branch 4 times, most recently from e96f4e2 to 08c1644 Compare May 6, 2026 07:19
Comment thread android-agent/api/android-agent.api Outdated
Comment thread .gitattributes Outdated

@breedx-splk breedx-splk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a reasonable approach to me...thanks for the contribution @Cloud-Architect-Emma!

There are two gradlew files that should not be part of this PR, as well as the .gitattributes, so lets get this removed and then move it forward. Thanks again for your patience!

@breedx-splk

Copy link
Copy Markdown
Contributor

Oh there are some compilation failures too in the HttpEndpointConnectivityTest. I'd recommend setting up the Android SDK so that you can build and test this project on your machine. 😉

@Cloud-Architect-Emma Cloud-Architect-Emma force-pushed the fix-custom-signal-url-v2 branch 3 times, most recently from eef4aa9 to b930b22 Compare May 10, 2026 01:03
@codecov

codecov Bot commented May 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.62500% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.61%. Comparing base (a18074b) to head (d2ea780).
⚠️ Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
...oid/agent/connectivity/HttpEndpointConnectivity.kt 86.36% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1723      +/-   ##
==========================================
- Coverage   62.41%   61.61%   -0.81%     
==========================================
  Files         160      158       -2     
  Lines        3480     3423      -57     
  Branches      353      345       -8     
==========================================
- Hits         2172     2109      -63     
- Misses       1209     1217       +8     
+ Partials       99       97       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Cloud-Architect-Emma

Copy link
Copy Markdown
Contributor Author

Hi @breedx-splk, all checks are now passing! I've addressed all your feedback:

  • Removed .gitattributes, gradlew.bat, and demo-app/gradlew.bat
  • Fixed compile error in HttpEndpointConnectivityTest.kt
  • Updated KDoc to note that fullUrl overrides baseUrl entirely
  • Fixed API file trailing newlines

Ready for your approval whenever you get a chance. Thank you so much for your patience throughout this whole process!

@Cloud-Architect-Emma

Copy link
Copy Markdown
Contributor Author

@breedx-splk, PR passed all checks. Can you please review at your convenience? Thnaks

Comment thread demo-app/gradlew.bat
Comment thread gradlew.bat
@Cloud-Architect-Emma Cloud-Architect-Emma force-pushed the fix-custom-signal-url-v2 branch from b930b22 to 4500ff1 Compare May 12, 2026 22:15

@breedx-splk breedx-splk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @Cloud-Architect-Emma! This is looking good to me now, and it's going to be useful for users to be able to customize the specific url for a given signal.

There's one result from this which is potentially odd looking, but I can't think of a better way of doing it that remains backwards compatible.

configuration = {
    httpExport {
        baseUrl = "http://10.0.2.2:4318"
        logs {
            url = "http://something.else.com"
            fullUrl = "https://something.other.net/v1/whatever"
        }
    }
...
}

I think that would be the worst case....and the solution IMO is pretty simple -- users shouldn't do that. :) Documentation is probably enough. 👍🏻

I would like the other @open-telemetry/android-maintainers to chime in as well before we merge. Thanks again for seeing this through.

@fractalwrench fractalwrench left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and thanks for the contribution. I agree that documentation should be sufficient to mitigate the comment @breedx-splk made.

@Cloud-Architect-Emma

Copy link
Copy Markdown
Contributor Author

Thank you @breedx-splk and @fractalwrench for the approvals!
Happy to address any remaining feedback from other maintainers
if needed, otherwise ready to merge whenever convenient.

@Cloud-Architect-Emma Cloud-Architect-Emma force-pushed the fix-custom-signal-url-v2 branch 3 times, most recently from ae7327e to 7511531 Compare May 16, 2026 11:09
@Cloud-Architect-Emma

Cloud-Architect-Emma commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

Hi @breedx-splk, the detekt check is now failing with 1 weighted
issue after I added test coverage for the fullUrl=true paths.

Could you help by running:
./gradlew :android-agent:apiDump :android-agent:detekt

and pushing the results to my branch? I'm unable to run the Android
Gradle build locally without the Android SDK.

Thank you so much for your patience, really appreciate it!

…al path appending

Co-authored-by: breedx-splk <breedx-splk@users.noreply.github.com>
@Cloud-Architect-Emma Cloud-Architect-Emma force-pushed the fix-custom-signal-url-v2 branch from 7511531 to d2ea780 Compare May 16, 2026 21:56
@Cloud-Architect-Emma

Copy link
Copy Markdown
Contributor Author

Hi @breedx-splk, I reverted the additional test I added (which was
causing a detekt failure I couldn't identify locally without the
Android SDK). The PR is back to the state you approved.

Could you let me know which detekt rule the new test was violating?
I'd like to add proper test coverage for the fullUrl=true paths but
want to make sure it passes detekt.

Thank you!

@Cloud-Architect-Emma

Copy link
Copy Markdown
Contributor Author

Hi @breedx-splk and @fractalwrench, the PR is back to the approved
state with all required checks passing. The only non-required check
failing is Codecov coverage which reflects the new code paths added.
Ready to merge whenever convenient!

@breedx-splk breedx-splk merged commit e6ec3c1 into open-telemetry:main May 18, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How can I specify a url for my logs in HttpExportConfiguration with different endpoint than v1/logs?

3 participants